const mongoose = require('mongoose');

const CommentSchema = new mongoose.Schema({
    article: {
        type: mongoose.Schema.Types.ObjectId,
        ref: 'Article'
    },
    user: {
        type: mongoose.Schema.Types.ObjectId,
        ref: 'User'
    },
    content: {
        type: String,
    },
    createAt: {
        type: Date,
        default: Date.now
    },
    lastUpdateTime: {
        type: Date,
        default: Date.now
    }
})